<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>车主详情</title>

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
</head>

<body>
<div class="row">
    <div class="col-lg-12">
        <div class="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <a href="/backend/dashboard">首页</a>
                </li>
                <li><a href="#">车主详情</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="row details">
    <div class="col-lg-12">
        <div class="row">
            <div class="col-lg-12 col-md-12">
                <div class="tc-tabs">
                    <div class="tab-content">
                        <div class="tab-pane fade active in">
                            <h2>车主详情</h2>
                            <div class="hr hr-12 hr-double"></div>
                            <div class="form-horizontal">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">用户手机号：</label>
                                    <div class="col-sm-3">
                                        ${driver.username}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">注册时间：</label>
                                    <div class="col-sm-3">
                                        ${driver.registrationDate}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">登录状态：</label>
                                    <div class="col-sm-5">
                                        ${driver.loginStatus}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">所在城市：</label>
                                    <div class="col-sm-5">
                                        ${driver.currentCity}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">账号状态：</label>
                                    <div class="col-sm-5">
                                        <c:choose>
                                            <c:when test="${driver.active}">
                                                已激活
                                            </c:when>
                                            <c:otherwise>
                                                已冻结
                                            </c:otherwise>
                                        </c:choose>
                                    </div>
                                </div>

                                <hr class="separator">

                                <c:forEach items="${driver.licensePlates}" var="licensePlate" varStatus="status">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label"><c:if test="${status.first}">车牌信息：</c:if></label>

                                        <div class="col-sm-5">
                                                ${licensePlate.licensePlateNumber} <c:if test="${licensePlate.priorityUsed}">（常用车牌）</c:if>
                                        </div>
                                    </div>
                                </c:forEach>

                                <c:forEach items="${driver.favoriteAddresses}" var="address" varStatus="status">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label"><c:if test="${status.first}">常用地址：</c:if></label>

                                        <div class="col-sm-5">
                                                ${address.name} （${address.address}）
                                        </div>
                                    </div>
                                </c:forEach>

                                <div class="form-actions">
                                    <div class="form-group">
                                        <div class="col-sm-offset-3 col-sm-9">
                                            <button type="button" class="btn" onclick="location.href='/backend/driversoverview'">返回</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>